home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games 1996 July / Amiga Games 1996 #7.iso / rexx / insert < prev    next >
Text File  |  1995-03-03  |  1KB  |  60 lines

  1. /* rx
  2. **
  3. ** Insert a new dataset in the address project
  4. */
  5.  
  6. options results
  7.  
  8. ADDRESS REXX_AB1
  9.  
  10. projectname = "AmigaBase:Data/English/Address"
  11.  
  12. ChrName  = "Steffen"
  13. Name     = "Gutmann"
  14. Street   = "Wiesentalstr. 30"
  15. Town     = "D-73312 Geislingen"
  16. Phone    = "+49-7331-63301"
  17. Fax      = "+49-7331-69142"
  18. Birthday = "28.11.1968"
  19. Misc     ="Informatik-Student"
  20.  
  21. /*
  22. ** switch to project
  23. */
  24. project projectname
  25. if result == 0 then
  26. do
  27.    /*
  28.    ** project not already in memory, load it.
  29.    ** First open a new window.
  30.    */
  31.    New
  32.    if result == 0 then
  33.    do
  34.       say "Can't open new project"
  35.       exit
  36.    end
  37.    Load projectname
  38.    if result == 0 then
  39.    do
  40.        say "Can't load" projectname
  41.        exit
  42.    end
  43. end
  44.  
  45. /*
  46. ** Call the _Insert function (AmigaBase program).
  47. ** The arguments are converted into a memo variable called arg1.
  48. ** The arguments are surrounded with double quotes (awk like).
  49. */
  50. Function _Insert '"'ChrName'" "'Name'" "'Street'" "'Town'"
  51.                   "'Phone'" "'Fax'" "'Birthday'" "'Misc'"'
  52.  
  53. /*
  54. ** perform some error checking. AmigaBase sets the variable
  55. ** rexx_ab.lasterror when an error has been occured.
  56. */
  57.  
  58. if rc ~= 0 then say rexx_ab.lasterror
  59.  
  60.